//
//  MobileParameter.m
//  Learn
//
//  Created by zyl_macbookpro on 2024/3/30.
//  Copyright © 2024 迟建国. All rights reserved.
//

#import "MobileParameter.h"

@implementation MobileParameter
+(BOOL)isXSerials
{
    BOOL iPhoneXSeries = NO;
    if (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPhone)//判断是否是iphone或者itouch
    {
        return iPhoneXSeries;
    }
    
    if (@available(iOS 11.0, *)) {
        UIWindow *mainWindow = [[[UIApplication sharedApplication] delegate] window];
        if (mainWindow.safeAreaInsets.bottom > 0.0)
        {
            iPhoneXSeries = YES;
        }
    }
    
    return iPhoneXSeries;
}
+ (double)getNavBarHeight
{
    if(@available(iOS 13.0, *)) {

            NSSet *set = [UIApplication sharedApplication].connectedScenes;

            UIWindowScene *windowScene = [set anyObject];

            UIStatusBarManager *statusBarManager = windowScene.statusBarManager;

            return statusBarManager.statusBarFrame.size.height + 44;

        }else{

            return [UIApplication sharedApplication].statusBarFrame.size.height + 44;

        }

    
}
@end
